<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<% String title = "全安药业信息综合系统后台登陆"; %>
<title><%=title %>
</title>
<style>
    .isDownload{
        display:none;
    }
    .showNoAuth{
        display:none;
        color:gray;
    }
</style>
</head>

<!-- BEGIN BODY -->
<body class="fixed-top" style="background: #fff;height: 1000px;">
<form id="reportQudaoProvnice" method="post">
</form>

<!-- ui-dialog -->
<div id="dialog" title="Dialog Title"  class="ui-dialog-content ui-widget-content">

</div>

<div class="modal fade" data-backdrop="static" tabindex="-1" id="myModal1">
    <!--窗口声明：-->
    <div class="modal-dialog modal-lg">
        <!-- 内容声明 -->
        <div class="modal-content">
            <br>
            <p style="margin-left:15px;">拼命下载中，请稍等 <span id="miao"></span> ……</p>
            <!-- 主体 -->
            <div class="modal-body">
                <div class="progress progress-info progress-striped">
                    <div id="sucessufl_bar" class="bar" style="width: 1%"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="container-fluid" >
    <!-- BEGIN PAGE HEADER-->
    <div class="row-fluid">
        <div class="span12">
            <!-- BEGIN PAGE TITLE & BREADCRUMB-->
            <h3 class="page-title">
                透视报表下载到Excel
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="${pageContext.request.contextPath}/user/index.do">系统首页Home</a>
                    <span class="divider">/</span>
                </li>
                <li class="active">
                    报表下载
                </li>
                <li class="pull-right search-wrap">
                    <form action="" class="hidden-phone">
                        <div class="input-append search-input-area">
                            <input class="" id="appendedInputButton" type="text">
                            <button class="btn" type="button"><i class="icon-search"></i></button>
                        </div>
                    </form>
                </li>
            </ul>
            <!-- END PAGE TITLE & BREADCRUMB-->
        </div>
    </div>
    <!-- END PAGE HEADER-->
    <!-- BEGIN PAGE CONTENT-->
    <div class="row-fluid" id="draggable_portlets">
        <!-- 流向情况-->
        <div class="span4 column sortable">
            <!-- BEGIN Portlet PORTLET-->
            <div class="widget red">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i> 2018年渠道+省份组合报表</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2018年全国纯销报表（透视【渠道+省份】纯销汇总）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2018qudaoAndProvice()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
            <!-- BEGIN Portlet PORTLET-->
            <div class="widget yellow">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i> 2018年渠道+片区组合报表</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2018年全国纯销报表（透视【渠道+片区】纯销汇总）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2018qudaoAndSpace()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
            <!-- BEGIN Portlet PORTLET-->
            <div class="widget green">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i>2018年品种+省份组合报表</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2018年全国纯销报表（透视【品种+省份】纯销汇总）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2018productAndprovice()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <div class="widget green">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i>2018年好伙伴【纯销】情况</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2018年好伙伴全国【纯销】报表（全终端全品种折合量月均过1000盒）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_cx2018goodfriend1000()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
        </div>



        <div class="span4 column sortable">
            <!-- BEGIN Portlet PORTLET-->
            <div class="widget purple">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i> 2018年品种+片区组合报表</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2018年全国纯销报表（透视【品种+片区】纯销汇总）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2018productAndSpace()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
            <!-- BEGIN Portlet PORTLET-->
            <div class="widget blue">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i> 2017年品种+片区组合报表</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2017年全国纯销报表（透视【品种+片区】纯销汇总）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2017productAndSpace()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
            <!-- BEGIN Portlet PORTLET-->
            <div class="widget orange">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i> 2017年品种+省份组合报表</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        2017年全国纯销报表（透视【品种+省份】纯销汇总）
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2017productAndprovice()" class="isDownload">下载</a>
                    </div>
                </div>
            </div>
            <div class="widget green">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i>2018年新开发终端、丢失终端相关情况</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                        <a href="javascript:void(0);" onclick="download_2018cxTPP2()" class="isDownload">2月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP3()" class="isDownload">3月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP4()" class="isDownload">4月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP5()" class="isDownload">5月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP6()" class="isDownload">6月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP7()" class="isDownload">7月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP8()" class="isDownload">8月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP9()" class="isDownload">9月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP10()" class="isDownload">10月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP11()" class="isDownload">11月下载</a>
                        &nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="download_2018cxTPP12()" class="isDownload">12月下载</a>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
        </div>



        <div class="span4 column sortable">
        <!-- BEGIN Portlet PORTLET-->
        <div class="widget">
            <div class="widget-title">
                <h4><i class="icon-edit"></i> 2017年渠道+省份组合报表</h4>
                <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
            </div>
            <div class="widget-body">
                <div>
                    2017年全国纯销报表（透视【渠道+省份】纯销汇总）
                    <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                    <a href="javascript:void(0);" onclick="download_2017qudaoAndProvice()" class="isDownload">下载</a>
                </div>
            </div>
        </div>
        <!-- END Portlet PORTLET-->
        <!-- BEGIN Portlet PORTLET-->
        <div class="widget purple">
            <div class="widget-title">
                <h4><i class="icon-edit"></i>2017年渠道+片区组合报表</h4>
                <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
            </div>
            <div class="widget-body">
                <div>
                    2017年全国纯销报表（透视【渠道+片区】纯销汇总）
                    <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                    <a href="javascript:void(0);" onclick="download_2017qudaoAndSpace()" class="isDownload">下载</a>
                </div>
            </div>
        </div>
        <!-- END Portlet PORTLET-->
        <!-- BEGIN Portlet PORTLET-->
        <div class="widget green">
            <div class="widget-title">
                <h4><i class="icon-edit"></i>月均过千盒的终端和区县</h4>
                <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
            </div>
            <div class="widget-body">
                <div>
                    【月均过千盒】的终端和区县情况（三品折量汇总 有效月 月均量）
                    <span class="showNoAuth">仅有全国权限时方可显示下载链接</span>
                    <a href="javascript:void(0);" onclick="download_2018MonthPVG1000()" class="isDownload">18年下载</a>
                    &nbsp;&nbsp;
                    <a href="javascript:void(0);" onclick="download_2017MonthPVG1000()" class="isDownload">17年下载</a>
                </div>
            </div>
        </div>
            <div class="widget green">
                <div class="widget-title">
                    <h4><i class="icon-edit"></i>2018年好伙伴【纯销】情况</h4>
                    <span class="tools">
                                <a class="icon-chevron-down" href="javascript:;"></a>
                                <a class="icon-remove" href="javascript:;"></a>
                             </span>
                </div>
                <div class="widget-body">
                    <div>
                        待开发待开发待开发待开发

                    </div>
                </div>
            </div>
        <!-- END Portlet PORTLET-->
    </div>

    </div>
    <!-- END PAGE CONTENT-->

</div>
<!-- END PAGE CONTAINER-->

<!-- BEGIN FOOTER -->
<div id="footer">2018 © 全安药业股份</div>
<!-- END FOOTER -->
<!-- Load javascripts at bottom, this will reduce page load time -->
<script src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.nicescroll.js" type="text/javascript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.slimscroll.min.js"></script>
<script src="${pageContext.request.contextPath}/js/fullcalendar.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<!-- ie8 fixes -->
<!--[if lt IE 9]>
<script src="${pageContext.request.contextPath}/js/excanvas.js"></script>
<script src="${pageContext.request.contextPath}/js/respond.js"></script>
<![endif]-->
<script src="${pageContext.request.contextPath}/js/jquery.easy-pie-chart.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.sparkline.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/Chart.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.scrollTo.min.js"></script>
<!--common script for all pages-->
<script src="${pageContext.request.contextPath}/js/common-scripts.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/draggable-portlet.js"></script>

<!-- END JAVASCRIPTS -->
<script>
    jQuery(document).ready(function () {
        DraggablePortlet.init();
    });
</script>
<script src="${pageContext.request.contextPath}/javascript/httpService.js"></script>
<!-- 自定义的script方法 -->
<script type="text/javascript">
    var p = 0;
    var miao = 0;
    var stop = 0;
    var url;
    var count=0;
    var action = "no_request";
    //启动进度条
    function start_progress() {
        miao += 1;
        if(p == 100){
            p = 0;
        }
        p += 10; //进度条每秒走10个单位
        if(stop==1){//ajax返回success时，stop=1
            $("#sucessufl_bar").css("width", "100%");//进度条完成100%
            $('#myModal1').modal('hide');//隐藏模板
            count = 0;//还原count
            stop = 0;//还原stop
            miao = 0;//还原miao
            action = "no_request";//还原action
            window.open(url);
            return;
        }
        $("#sucessufl_bar").css("width", p + "%");
        $("#miao").html(miao);
        if(count == 1){
            if(action==="download_2018qudaoAndProvice") {
                var params = $("#reportQudaoProvnice").serialize();
                sendRequest(pageContextPath + "/plans/download_2018qudaoAndProvice.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018qudaoAndSpace") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018qudaoAndSpace.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018productAndprovice") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018productAndprovice.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018productAndSpace") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018productAndSpace.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }

            if(action==="download_2017qudaoAndProvice") {
                var params = $("#reportQudaoProvnice").serialize();
                sendRequest(pageContextPath + "/plans/download_2017qudaoAndProvice.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2017qudaoAndSpace") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2017qudaoAndSpace.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2017productAndprovice") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2017productAndprovice.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2017productAndSpace") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2017productAndSpace.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018MonthPVG1000") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018MonthPVG1000.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2017MonthPVG1000") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2017MonthPVG1000.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_cx2018goodfriend1000") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_cx2018goodfriend1000.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP2") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP2.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP3") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP3.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP4") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP4.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP5") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP5.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP6") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP6.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP7") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP7.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP8") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP8.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP9") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP9.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP10") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP10.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP11") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP11.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
            if(action==="download_2018cxTPP12") {
                var params = $("#plans").serialize();
                sendRequest(pageContextPath + "/plans/download_2018cxTPP12.do", params, function (jsonData) {
                    stop = jsonData.sucessful;
                    var filePath  = jsonData.filePath;
                    url = pageContextPath+filePath;
                },true);
            }
        }
        count += 1;
        //每秒执行一次
        var timer = setTimeout("start_progress()", 1000);
    }
    //数据量过大，下载不了，通过工程师去数据库直接导出。
    function fail_download_all() {
        //$('#notice').modal('show');
        $("#dialog").html("");
        var html = '<p>数据量过大，请不要浪费时间下载，请联系全安工程师获取相关数据！</p>';
        $("#dialog").html(html);
        $("#dialog" ).dialog( "open" );
    }
    //提示对话框
    $( "#dialog" ).dialog({
        autoOpen: false,
        width: 600,
        title:'<%=title%>',
        buttons: [
            {
                text: "知道了",
                click: function() {
                    $( this ).dialog( "close" );
                }
            }
        ]
    });

    //下载2018渠道和省份
    function download_2018qudaoAndProvice() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018qudaoAndProvice";
    }
    //下载2018渠道和片区
    function download_2018qudaoAndSpace() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018qudaoAndSpace";
    }
    //下载2018品种和省份
    function download_2018productAndprovice() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018productAndprovice";
    }
    //下载2018品种和片区
    function download_2018productAndSpace() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018productAndSpace";
    }

    //下载2017渠道和省份
    function download_2017qudaoAndProvice() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2017qudaoAndProvice";
    }
    //下载2017渠道和片区
    function download_2017qudaoAndSpace() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2017qudaoAndSpace";
    }
    //下载2017品种和省份
    function download_2017productAndprovice() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2017productAndprovice";
    }
    //下载2017品种和片区
    function download_2017productAndSpace() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2017productAndSpace";
    }
    //下载2018月均过1000盒的终端和区县
    function download_2018MonthPVG1000() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018MonthPVG1000";
    }
    //下载2017月均过1000盒的终端和区县
    function download_2017MonthPVG1000() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2017MonthPVG1000";
    }
    //下载2018月均过1000盒的好伙伴
    function download_cx2018goodfriend1000() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_cx2018goodfriend1000";
    }

    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP2() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP2";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP3() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP3";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP4() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP4";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP5() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP5";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP6() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP6";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP7() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP7";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP8() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP8";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP9() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP9";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP10() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP10";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP11() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP11";
    }
    //下载2018 保有终端、新开发终端、丢失终端情况 TPP(为终端品种包装的简称)
    function download_2018cxTPP12() {
        $('#myModal1').modal('show');
        //调用进度条
        start_progress();
        action = "download_2018cxTPP12";
    }
    /***
     * 暂时没弄权限管理，简单处理，通过用户的lev来设置权限，1表示有权限，0表示没权限。
     */
    $(function(){
        sendRequest(pageContextPath + "/user/getCurrentLoginUser.do", null, function (jsonData) {
            var user = jsonData.user;
            if(user != null&&user.lev >= 1){
                $(".isDownload").each(function(){
                    $(this).fadeIn(3000);
                });
            } else {
                $(".isDownload").each(function(){
                    $(this).fadeOut(1);
                });
                $(".showNoAuth").each(function(){
                    $(this).fadeIn(3000);
                });
            }
        });
    });
</script>
</body>
<!-- END BODY -->
</html>